<?php
// populate two lists - $this->prereg_cases and $this->pending_cases
// neat way would be to include two Dojo ContentPanes.  heirarchy is
// form (action = /keystone/VAS/index/matchpreregcases)
//   content pane 1 with prereg cases, each with checkmark 
//   content pane 2 with pending & finished cases
 ?>
 
<div id="prereg_form">

<form method="POST" action="/keystone/VAS/index/matchpreregcases">

<div dojoType="dijit.layout.ContentPane" style="float:left; width=50%">
<?php
foreach( $this->preregCases as $preregCase )
{
	$caseid = $preregCase['id'];
	$decedent_fname = $pendingCase['decedent_fname'];
	$decedent_mname = $pendingCase['decedent_mname'];
	$decedent_lname = $pendingCase['decedent_lname'];
	$decedent_city = $pendingCase['decedent_city'];
	$decedent_state = $pendingCase['decedent_state'];
	$decedent_dob = $pendingCase['decedent_dob'];
	
	echo "<span class=\"prereg_decedent\">";
	echo "<input type=checkbox name=\"preregcases[]\" value=\"$caseid\">";
	echo " Decedent: <strong>$decedent_fname $decedent_mname $decedent_lname</strong><br>";
	echo " Location: <strong>$decedent_city $decedent_state</strong><br>";
	echo "</span>";
}
 ?>
</div>

<div dojoType="dijit.layout.ContentPane" style="float:left; width=50%">

echo "Pending Cases:<br>";
if( count($this->pendingCases) < 1 )
{
	echo "No pending cases found for this FD<br>";
}
else
{
	foreach( $this->pendingCases as $pendingCase )
	{
		$FDMS_case_num = $pendingCase['FDMS_case_num'];
		$decedent_fname = $pendingCase['decedent_fname'];
		$decedent_mname = $pendingCase['decedent_mname'];
		$decedent_lname = $pendingCase['decedent_lname'];
		$decedent_city = $pendingCase['decedent_city'];
		$decedent_state = $pendingCase['decedent_state'];
		$decedent_dob = $pendingCase['decedent_dob'];
		
		echo "<span class=\"submitted_decedent\">";
		echo " Decedent: <strong>$decedent_fname $decedent_mname $decedent_lname</strong><br>";
		echo " Location: <strong>$decedent_city $decedent_state</strong><br>";
		echo "</span>";
	}
}

echo "<br>Finished Cases:<br>";
if( count($this->finishedCases) < 1 )
{
	echo "No finished cases found for this FD<br>";
}
else
{
	foreach( $this->finishedCases as $finishedCase )
	{
		$FDMS_case_num = $finishedCase['FDMS_case_num'];
		$decedent_fname = $finishedCase['decedent_fname'];
		$decedent_mname = $finishedCase['decedent_mname'];
		$decedent_lname = $finishedCase['decedent_lname'];
		$decedent_city = $finishedCase['decedent_city'];
		$decedent_state = $finishedCase['decedent_state'];
		$decedent_dob = $finishedCase['decedent_dob'];
		
		echo "<span class=\"finished_decedent\">";
		echo " Decedent: <strong>$decedent_fname $decedent_mname $decedent_lname</strong><br>";
		echo " Location: <strong>$decedent_city $decedent_state</strong><br>";
		echo "</span>";
	}
}

</div>

<input type=submit>

</form>

 </div>